import request from '@/utils/request'

// 查询募捐项目列表
export function listDonationproject(query) {
  return request({
    url: '/system/donationproject/list',
    method: 'get',
    params: query
  })
}

// 查询募捐项目详细
export function getDonationproject(dpId) {
  return request({
    url: '/system/donationproject/' + dpId,
    method: 'get'
  })
}

// 新增募捐项目
export function addDonationproject(data) {
  return request({
    url: '/system/donationproject',
    method: 'post',
    data: data
  })
}

// 修改募捐项目
export function updateDonationproject(data) {
  return request({
    url: '/system/donationproject',
    method: 'put',
    data: data
  })
}

// 删除募捐项目
export function delDonationproject(dpId) {
  return request({
    url: '/system/donationproject/' + dpId,
    method: 'delete'
  })
}
